/* $Header: meth_config.h,v 2.2 01/10/02 10:30:30 przybyls Exp $ */

/***********************************************************************/
/* INCLUDE FILE NAME:  meth_config.h                                   */
/* ==================                                                  */
/*                                                                     */
/* Author:  John DeGood                                                */
/*                                                                     */
/* COMMENT: Include file for method configuration checking.            */
/*                                                                     */
/***********************************************************************/

#ifndef METH_CONFIG_H
#define METH_CONFIG_H

/*****************************/
/*   IFDEFS                  */
/*****************************/

/*****************************/
/*   SYMBOLIC CONSTANTS      */
/*****************************/

/*****************************/
/*   MACROS                  */
/*****************************/

/*****************************/
/*   TYPEDEFS                */
/*****************************/


typedef struct
{
        BIT8                    name[21];
        BIT8                    OvenType;
        BIT8                    ZonePresence[7];
        CRYO_TYPE               CryoType;
        INT32                   OvenMax;
        U_INT32                 ZoneMaxRate[7];
        INT16                   ZoneMinSetpt[7];
        U_INT16                 ZoneMaxSetpt[7];

        DET_TYPE                DetectorType[2];
        BIT8                    Electrometer[2];
        TRUE_FALSE              IsDetectorEpc[2];
        INT32                   DetFuelSensorRange[2];
        INT32                   DetUtilSensorRange[2];
        INT32                   DetMugSensorRange[2];
        GAS_TYPE                DetUtilGasType[2];
        GAS_TYPE                DetMugGasType[2];
        BIT8                 CPFDetPneuPresence[2];
        BIT8                 CPFDetTitlePresence[2];
        BIT8                 CPFDetTitle[2][DET_NAME_SIZE+1]; /* str + \0 */
            U_INT16              CPFDetGasPresence[2][NUM_DET_GAS+1]; /* 1..3 */
                             /* int16 b/c OEM bitpacks MaxFlow# for each gas */
        BIT8                 CPFOIMPresence[2];
        BIT8                 CPFCtlNumBits[2][NUM_OIM_CHAN+1]; /* 0, 1..4 */
                             /* channels 1..4 for OIM, 0..4 for OEM       */

        BIT8                 CPFInletTitlePresence[2];
        BIT8                 CPFInletTitle[2][INLET_NAME_SIZE+1]; /* str + \0 */
        INLET_TYPE              InletType[2];
        INT32                   InletPSensorRange[2];
        TRUE_FALSE              IsInletEpc[2];
        GAS_TYPE                InletGasType[2];
        INT32                   InletPresEquib[2];
        INT32                   InletFlowEquib[2];
    PNEU_PORT_STATE InletVentState[2]; /* CAPPED=1 PLUMBED= 2 */

    AUX_TYPE            AuxType[2];

        BIT8                    PneuAuxType[3];
        INT32                   AuxPSensorRange[3];
        GAS_TYPE                AuxGasType[3];
        INT32                   AuxPresEquibTime[3];

        VALVE_TYPE              ValveType[8];
        INT32                   ValveLoopVolume[8];
        VALVE_POSITION          ValveInlet[8];
        INT32                   MultiTime[8];
        ON_OFF                  InvertBcd[8];

        BIT8                    MioBdPresence;

        BIT8                    AlsPowerSupply;
        BIT8                    AlsFrInjector;
        BIT8                    AlsBkInjector;
        BIT8                    AlsTray;
        BIT8                    AlsHadPowerSupply;

        BIT8                    EpcBdPresence;

        INT32                   ColLength[2];
        INT32                   ColDiam[2];
        INT32                   ColFilmThick[2];
        SOURCE_CONNECTION       ColSource[2];
        OUTLET_CONNECTION       ColOutlet[2];
        ON_OFF                  ColVacuumComp[2];
        TRUE_FALSE              ColOutletPresCompEnabled[2];
        INT32                   ColOutletPresCompSetpt[2];
} GCCW;

/*
   IMPORTANT !!! do NOT grab:
    1/ CPFDetTitlePresence[2]  -or -
    2/ CPFInletTitlePresence[2] -or-
    3/ CPFDetPneuPresence[2]
   because gccw checking on pwrfail_rcvy OR methload uses them for CPF
   check purposes even if OEM (not CPF) is installed !!

   next 3 #defines are OK

*/

#define OEMCtlPulseLens CPFCtlNumBits
#define OEMDetGasModes  CPFDetGasPresence
#define OEMCtlStates    CPFDetTitle

/* end IMPORTANT */

/*****************************/
/*      GLOBAL VARIABLES     */
/*****************************/

#pragma SECTION DATA=pfail

extern GCCW gccw;

#pragma SECTION UNDO

/*****************************/
/*    FUNCTION PROTOTYPES    */
/*****************************/

#endif
